home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 September / PCWorld_2002-09_cd.bin / Akce / Quartet / Main / MAIN.SWF / scripts / DefineButton2_117 / BUTTONCONDACTION on(release).as
Text File  |  2002-08-07  |  1KB  |  38 lines

  1. on(release){
  2.    compl = 0;
  3.    if(focus_is_on != 1)
  4.    {
  5.       j = 1;
  6.       while(j <= Number(size))
  7.       {
  8.          if(compl == 1)
  9.          {
  10.             break;
  11.          }
  12.          if(eval("text" + chr(96 + j) + "_index") == focus_is_on && eval("text" + chr(96 + j) + "_index") != 1)
  13.          {
  14.             k = 1;
  15.             while(k <= Number(size))
  16.             {
  17.                if(eval("text" + chr(96 + k) + "_index") == focus_is_on - 1)
  18.                {
  19.                   ypos1 = getProperty("text" + j, _Y);
  20.                   ypos2 = getProperty("text" + k, _Y);
  21.                   eval("text" + k)._y = ypos1;
  22.                   eval("text" + j)._y = ypos2;
  23.                   set("text" + chr(96 + j) + "_index",focus_is_on - 1);
  24.                   set("text" + chr(96 + k) + "_index",focus_is_on);
  25.                   eval("foc" + focus_is_on)._visible = 0;
  26.                   compl = 1;
  27.                   break;
  28.                }
  29.                k++;
  30.             }
  31.          }
  32.          j++;
  33.       }
  34.       focus_is_on -= 1;
  35.       eval("foc" + focus_is_on)._visible = 1;
  36.    }
  37. }
  38.